﻿// DlgOptUI.cpp: 实现文件
//

#include "stdafx.h"
#include "GHCY.h"
#include "afxdialogex.h"
#include "Ground.h"
#include "DlgOptUI.h"


// DlgOptUI 对话框

IMPLEMENT_DYNAMIC(DlgOptUI, CDialogEx)

DlgOptUI::DlgOptUI(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_OPT_UI, pParent)
	, m_nHideNodeNum(theApp.m_nHideNodeNum)
{

}

DlgOptUI::~DlgOptUI()
{
}

void DlgOptUI::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
	DDX_Check(pDX, IDC_CHECK8, m_nHideNodeNum);
}


BEGIN_MESSAGE_MAP(DlgOptUI, CDialogEx)
	ON_BN_CLICKED(IDOK, &DlgOptUI::OnBnClickedOk)
END_MESSAGE_MAP()


// DlgOptUI 消息处理程序

void DlgOptUI::OnBnClickedOk()
{
	UpdateData();

	theApp.m_nHideNodeNum = m_nHideNodeNum;
	theApp.setSysInt(L"m_nHideNodeNum", m_nHideNodeNum);

	EndDialog(IDOK);

	theApp.m_pGround->m_bDrawBackground = TRUE;
}
